package com.meilai.project.service.administration.seal;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.meilai.project.dto.administration.seal.BorrowSealFlowDTO;
import com.meilai.project.dto.workflow.WorkFlowExtraCheckDTO;
import com.meilai.project.entity.administration.seal.BorrowSealFlow;
import com.baomidou.mybatisplus.extension.service.IService;
import com.meilai.project.vo.administration.seal.DictSealTypeVO;

import java.util.List;

/**
 * <p>
 * 借用印章申请表 服务类
 * </p>
 *
 * @author xhy
 * @since 2022-01-24
 */
public interface BorrowSealFlowService extends IService<BorrowSealFlow> {
    /**
     * 分页查询
     *
     * @param current_page
     * @param page_size
     * @param is_manage_page
     * @param name
     * @param seal_type_id
     * @param seal_type_name
     * @param borrowing_time_start
     * @param borrowing_time_end
     * @param estimated_return_time_start
     * @param estimated_return_time_end
     * @param return_time_start
     * @param return_time_end
     * @return
     */
    Page<BorrowSealFlow> selectPage(Integer current_page, Integer page_size, Boolean is_manage_page, String name, Long seal_type_id, String seal_type_name, String borrowing_time_start, String borrowing_time_end, String estimated_return_time_start, String estimated_return_time_end, String return_time_start, String return_time_end, Long company_id);

    /**
     * 保存流程
     *
     * @param dto
     * @return
     */
    boolean save(BorrowSealFlowDTO dto);

    /**
     * 提交流程
     *
     * @param dto
     * @return
     */
    boolean begin(BorrowSealFlowDTO dto);

    /**
     * 通过
     *
     * @param dto
     * @return
     */
    boolean pass(WorkFlowExtraCheckDTO dto);

    /**
     * 退回
     *
     * @param dto
     * @return
     */
    boolean returnBack(WorkFlowExtraCheckDTO dto);

    /**
     * 删除
     *
     * @param id
     * @return
     */
    boolean delete(Long id);

    /**
     * 彻底删除
     *
     * @param id
     * @return
     */
    boolean actualDelete(Long id);

    /**
     * 获取印章数据
     *
     * @return
     */
    List<DictSealTypeVO> getSealTypeList(Long company_id);

    BorrowSealFlow one(Long id);

    /**
     * 归还印章
     *
     * @param id
     * @return
     */
    boolean sealReturn(Long id);
}
